package com.ctsi.ssdc.domain;

import com.ctsi.ssdc.annotation.AutoId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.ZonedDateTime;
import java.util.ArrayList;
import java.util.Arrays;

/**
 * @author ctsi-biyi-generator
*/
@ApiModel(description = "LitemallGoods")
public class LitemallGoods implements Serializable {
    /**
     * @Fields id 
     */
    @ApiModelProperty("")
    @AutoId(primaryKey = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Integer id;

    /**
     * @Fields goodsSn 商品编号
     */
    @ApiModelProperty("goodsSn")
    private String goodsSn;

    /**
     * @Fields name 商品名称
     */
    @ApiModelProperty("name")
    private String name;

    /**
     * @Fields categoryId 商品所属类目ID
     */
    @ApiModelProperty("categoryId")
    private Integer categoryId;

    /**
     * @Fields brandId 
     */
    @ApiModelProperty("")
    private Integer brandId;

    /**
     * @Fields gallery 商品宣传图片列表，采用JSON数组格式
     */
    @ApiModelProperty("gallery")
    private String gallery;

    /**
     * @Fields keywords 商品关键字，采用逗号间隔
     */
    @ApiModelProperty("keywords")
    private String keywords;

    /**
     * @Fields brief 商品简介
     */
    @ApiModelProperty("brief")
    private String brief;

    /**
     * @Fields isOnSale 是否上架
     */
    @ApiModelProperty("isOnSale")
    private Boolean isOnSale;

    /**
     * @Fields sortOrder 
     */
    @ApiModelProperty("")
    private Short sortOrder;

    /**
     * @Fields picUrl 商品页面商品图片
     */
    @ApiModelProperty("picUrl")
    private String picUrl;

    /**
     * @Fields shareUrl 商品分享海报
     */
    @ApiModelProperty("shareUrl")
    private String shareUrl;

    /**
     * @Fields isNew 是否新品首发，如果设置则可以在新品首发页面展示
     */
    @ApiModelProperty("isNew")
    private Boolean isNew;

    /**
     * @Fields isHot 是否人气推荐，如果设置则可以在人气推荐页面展示
     */
    @ApiModelProperty("isHot")
    private Boolean isHot;

    /**
     * @Fields unit 商品单位，例如件、盒
     */
    @ApiModelProperty("unit")
    private String unit;

    /**
     * @Fields counterPrice 专柜价格
     */
    @ApiModelProperty("counterPrice")
    private BigDecimal counterPrice;

    /**
     * @Fields retailPrice 零售价格
     */
    @ApiModelProperty("retailPrice")
    private BigDecimal retailPrice;

    /**
     * @Fields addTime 创建时间
     */
    @ApiModelProperty("addTime")
    private ZonedDateTime addTime;

    /**
     * @Fields updateTime 更新时间
     */
    @ApiModelProperty("updateTime")
    private ZonedDateTime updateTime;

    /**
     * @Fields deleted 逻辑删除
     */
    @ApiModelProperty("deleted")
    private Boolean deleted;

    /**
     * @Fields detail 商品详细介绍，是富文本格式
     */
    @ApiModelProperty("detail")
    private String detail;

    private static final long serialVersionUID = 1L;

    /** 
     * @return id 
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /** 
     * @return goods_sn 商品编号
     */
    public String getGoodsSn() {
        return goodsSn;
    }

    /**
     * @param goodsSn 商品编号
     */
    public void setGoodsSn(String goodsSn) {
        this.goodsSn = goodsSn == null ? null : goodsSn.trim();
    }

    /** 
     * @return name 商品名称
     */
    public String getName() {
        return name;
    }

    /**
     * @param name 商品名称
     */
    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    /** 
     * @return category_id 商品所属类目ID
     */
    public Integer getCategoryId() {
        return categoryId;
    }

    /**
     * @param categoryId 商品所属类目ID
     */
    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    /** 
     * @return brand_id 
     */
    public Integer getBrandId() {
        return brandId;
    }

    /**
     * @param brandId 
     */
    public void setBrandId(Integer brandId) {
        this.brandId = brandId;
    }

    /** 
     * @return gallery 商品宣传图片列表，采用JSON数组格式
     */
    public String getGallery() {
        return gallery;
    }

    /**
     * @param gallery 商品宣传图片列表，采用JSON数组格式
     */
    public void setGallery(String gallery) {
        this.gallery = gallery == null ? null : gallery.trim();
    }

    /** 
     * @return keywords 商品关键字，采用逗号间隔
     */
    public String getKeywords() {
        return keywords;
    }

    /**
     * @param keywords 商品关键字，采用逗号间隔
     */
    public void setKeywords(String keywords) {
        this.keywords = keywords == null ? null : keywords.trim();
    }

    /** 
     * @return brief 商品简介
     */
    public String getBrief() {
        return brief;
    }

    /**
     * @param brief 商品简介
     */
    public void setBrief(String brief) {
        this.brief = brief == null ? null : brief.trim();
    }

    /** 
     * @return is_on_sale 是否上架
     */
    public Boolean getIsOnSale() {
        return isOnSale;
    }

    /**
     * @param isOnSale 是否上架
     */
    public void setIsOnSale(Boolean isOnSale) {
        this.isOnSale = isOnSale;
    }

    /** 
     * @return sort_order 
     */
    public Short getSortOrder() {
        return sortOrder;
    }

    /**
     * @param sortOrder 
     */
    public void setSortOrder(Short sortOrder) {
        this.sortOrder = sortOrder;
    }

    /** 
     * @return pic_url 商品页面商品图片
     */
    public String getPicUrl() {
        return picUrl;
    }

    /**
     * @param picUrl 商品页面商品图片
     */
    public void setPicUrl(String picUrl) {
        this.picUrl = picUrl == null ? null : picUrl.trim();
    }

    /** 
     * @return share_url 商品分享海报
     */
    public String getShareUrl() {
        return shareUrl;
    }

    /**
     * @param shareUrl 商品分享海报
     */
    public void setShareUrl(String shareUrl) {
        this.shareUrl = shareUrl == null ? null : shareUrl.trim();
    }

    /** 
     * @return is_new 是否新品首发，如果设置则可以在新品首发页面展示
     */
    public Boolean getIsNew() {
        return isNew;
    }

    /**
     * @param isNew 是否新品首发，如果设置则可以在新品首发页面展示
     */
    public void setIsNew(Boolean isNew) {
        this.isNew = isNew;
    }

    /** 
     * @return is_hot 是否人气推荐，如果设置则可以在人气推荐页面展示
     */
    public Boolean getIsHot() {
        return isHot;
    }

    /**
     * @param isHot 是否人气推荐，如果设置则可以在人气推荐页面展示
     */
    public void setIsHot(Boolean isHot) {
        this.isHot = isHot;
    }

    /** 
     * @return unit 商品单位，例如件、盒
     */
    public String getUnit() {
        return unit;
    }

    /**
     * @param unit 商品单位，例如件、盒
     */
    public void setUnit(String unit) {
        this.unit = unit == null ? null : unit.trim();
    }

    /** 
     * @return counter_price 专柜价格
     */
    public BigDecimal getCounterPrice() {
        return counterPrice;
    }

    /**
     * @param counterPrice 专柜价格
     */
    public void setCounterPrice(BigDecimal counterPrice) {
        this.counterPrice = counterPrice;
    }

    /** 
     * @return retail_price 零售价格
     */
    public BigDecimal getRetailPrice() {
        return retailPrice;
    }

    /**
     * @param retailPrice 零售价格
     */
    public void setRetailPrice(BigDecimal retailPrice) {
        this.retailPrice = retailPrice;
    }

    /** 
     * @return add_time 创建时间
     */
    public ZonedDateTime getAddTime() {
        return addTime;
    }

    /**
     * @param addTime 创建时间
     */
    public void setAddTime(ZonedDateTime addTime) {
        this.addTime = addTime;
    }

    /** 
     * @return update_time 更新时间
     */
    public ZonedDateTime getUpdateTime() {
        return updateTime;
    }

    /**
     * @param updateTime 更新时间
     */
    public void setUpdateTime(ZonedDateTime updateTime) {
        this.updateTime = updateTime;
    }

    /** 
     * @return deleted 逻辑删除
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * @param deleted 逻辑删除
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    /** 
     * @return detail 商品详细介绍，是富文本格式
     */
    public String getDetail() {
        return detail;
    }

    /**
     * @param detail 商品详细介绍，是富文本格式
     */
    public void setDetail(String detail) {
        this.detail = detail == null ? null : detail.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        LitemallGoods other = (LitemallGoods) that;
        return (this.getId() == null ? other.getId() == null :
				 this.getId().equals(other.getId()))
            && (this.getGoodsSn() == null ? other.getGoodsSn() == null :
				 this.getGoodsSn().equals(other.getGoodsSn()))
            && (this.getName() == null ? other.getName() == null :
				 this.getName().equals(other.getName()))
            && (this.getCategoryId() == null ? other.getCategoryId() == null :
				 this.getCategoryId().equals(other.getCategoryId()))
            && (this.getBrandId() == null ? other.getBrandId() == null :
				 this.getBrandId().equals(other.getBrandId()))
            && (this.getGallery() == null ? other.getGallery() == null :
				 this.getGallery().equals(other.getGallery()))
            && (this.getKeywords() == null ? other.getKeywords() == null :
				 this.getKeywords().equals(other.getKeywords()))
            && (this.getBrief() == null ? other.getBrief() == null :
				 this.getBrief().equals(other.getBrief()))
            && (this.getIsOnSale() == null ? other.getIsOnSale() == null :
				 this.getIsOnSale().equals(other.getIsOnSale()))
            && (this.getSortOrder() == null ? other.getSortOrder() == null :
				 this.getSortOrder().equals(other.getSortOrder()))
            && (this.getPicUrl() == null ? other.getPicUrl() == null :
				 this.getPicUrl().equals(other.getPicUrl()))
            && (this.getShareUrl() == null ? other.getShareUrl() == null :
				 this.getShareUrl().equals(other.getShareUrl()))
            && (this.getIsNew() == null ? other.getIsNew() == null :
				 this.getIsNew().equals(other.getIsNew()))
            && (this.getIsHot() == null ? other.getIsHot() == null :
				 this.getIsHot().equals(other.getIsHot()))
            && (this.getUnit() == null ? other.getUnit() == null :
				 this.getUnit().equals(other.getUnit()))
            && (this.getCounterPrice() == null ? other.getCounterPrice() == null :
				 this.getCounterPrice().equals(other.getCounterPrice()))
            && (this.getRetailPrice() == null ? other.getRetailPrice() == null :
				 this.getRetailPrice().equals(other.getRetailPrice()))
            && (this.getAddTime() == null ? other.getAddTime() == null :
				 this.getAddTime().equals(other.getAddTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null :
				 this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getDeleted() == null ? other.getDeleted() == null :
				 this.getDeleted().equals(other.getDeleted()))
            && (this.getDetail() == null ? other.getDetail() == null :
				 this.getDetail().equals(other.getDetail()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getGoodsSn() == null) ? 0 : getGoodsSn().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode());
        result = prime * result + ((getBrandId() == null) ? 0 : getBrandId().hashCode());
        result = prime * result + ((getGallery() == null) ? 0 : getGallery().hashCode());
        result = prime * result + ((getKeywords() == null) ? 0 : getKeywords().hashCode());
        result = prime * result + ((getBrief() == null) ? 0 : getBrief().hashCode());
        result = prime * result + ((getIsOnSale() == null) ? 0 : getIsOnSale().hashCode());
        result = prime * result + ((getSortOrder() == null) ? 0 : getSortOrder().hashCode());
        result = prime * result + ((getPicUrl() == null) ? 0 : getPicUrl().hashCode());
        result = prime * result + ((getShareUrl() == null) ? 0 : getShareUrl().hashCode());
        result = prime * result + ((getIsNew() == null) ? 0 : getIsNew().hashCode());
        result = prime * result + ((getIsHot() == null) ? 0 : getIsHot().hashCode());
        result = prime * result + ((getUnit() == null) ? 0 : getUnit().hashCode());
        result = prime * result + ((getCounterPrice() == null) ? 0 : getCounterPrice().hashCode());
        result = prime * result + ((getRetailPrice() == null) ? 0 : getRetailPrice().hashCode());
        result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        result = prime * result + ((getDetail() == null) ? 0 : getDetail().hashCode());
        return result;
    }


    public enum Column {
        id("id", "id", "INTEGER", false),
        goodsSn("goods_sn", "goodsSn", "VARCHAR", false),
        name("name", "name", "VARCHAR", true),
        categoryId("category_id", "categoryId", "INTEGER", false),
        brandId("brand_id", "brandId", "INTEGER", false),
        gallery("gallery", "gallery", "VARCHAR", false),
        keywords("keywords", "keywords", "VARCHAR", false),
        brief("brief", "brief", "VARCHAR", false),
        isOnSale("is_on_sale", "isOnSale", "BIT", false),
        sortOrder("sort_order", "sortOrder", "SMALLINT", false),
        picUrl("pic_url", "picUrl", "VARCHAR", false),
        shareUrl("share_url", "shareUrl", "VARCHAR", false),
        isNew("is_new", "isNew", "BIT", false),
        isHot("is_hot", "isHot", "BIT", false),
        unit("unit", "unit", "VARCHAR", false),
        counterPrice("counter_price", "counterPrice", "DECIMAL", false),
        retailPrice("retail_price", "retailPrice", "DECIMAL", false),
        addTime("add_time", "addTime", "TIMESTAMP", false),
        updateTime("update_time", "updateTime", "TIMESTAMP", false),
        deleted("deleted", "deleted", "BIT", false),
        detail("detail", "detail", "LONGVARCHAR", false);

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_goods
         *
         * @mbg.generated
         */
        private static final String BEGINNING_DELIMITER = "`";

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_goods
         *
         * @mbg.generated
         */
        private static final String ENDING_DELIMITER = "`";

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_goods
         *
         * @mbg.generated
         */
        private final String column;

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_goods
         *
         * @mbg.generated
         */
        private final boolean isColumnNameDelimited;

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_goods
         *
         * @mbg.generated
         */
        private final String javaProperty;

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_goods
         *
         * @mbg.generated
         */
        private final String jdbcType;

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_goods
         *
         * @mbg.generated
         */
        public String value() {
            return this.column;
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_goods
         *
         * @mbg.generated
         */
        public String getValue() {
            return this.column;
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_goods
         *
         * @mbg.generated
         */
        public String getJavaProperty() {
            return this.javaProperty;
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_goods
         *
         * @mbg.generated
         */
        public String getJdbcType() {
            return this.jdbcType;
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_goods
         *
         * @mbg.generated
         */
        Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
            this.column = column;
            this.javaProperty = javaProperty;
            this.jdbcType = jdbcType;
            this.isColumnNameDelimited = isColumnNameDelimited;
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_goods
         *
         * @mbg.generated
         */
        public String desc() {
            return this.getEscapedColumnName() + " DESC";
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_goods
         *
         * @mbg.generated
         */
        public String asc() {
            return this.getEscapedColumnName() + " ASC";
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_goods
         *
         * @mbg.generated
         */
        public static Column[] excludes(Column ... excludes) {
            ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
            if (excludes != null && excludes.length > 0) {
                columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
            }
            return columns.toArray(new Column[]{});
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_goods
         *
         * @mbg.generated
         */
        public String getEscapedColumnName() {
            if (this.isColumnNameDelimited) {
                return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
            } else {
                return this.column;
            }
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_goods
         *
         * @mbg.generated
         */
        public String getAliasedEscapedColumnName() {
            return this.getEscapedColumnName();
        }
    }
}